package Code;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class QuestionNum_23_4_hxj {
    public static void main(String[] args) throws Exception{
        List<Integer> list = new ArrayList<>();
        int count = 0;
        Random r = new Random();
        while (count < 10){
            int nextInt = r.nextInt(100);
            if (nextInt >= 10){
                list.add(nextInt);
            }
            count++;
        }
        System.out.println(list);

        BufferedWriter bw = new BufferedWriter(new FileWriter("C:\\360Downloads\\1\\number.txt"));
        bw.write(list.toString());
        bw.close();
    }
}
